#include "StdAfx.h"
#include "BtnSTCheckBlue.h"

BtnSTCheckBlue::BtnSTCheckBlue()
{
}

BtnSTCheckBlue::~BtnSTCheckBlue()
{
}

void BtnSTCheckBlue::DrawFocusBitmap(CDC* pDC, CRect itemRect)
{
    CRect focusRect = itemRect;
    focusRect.DeflateRect(2, 2);
    pDC->Draw3dRect(focusRect, ::GetSysColor(COLOR_BTNSHADOW), ::GetSysColor(COLOR_BTNHILIGHT));

    focusRect.DeflateRect(2, 2);
    pDC->FillSolidRect(focusRect, RGB(202, 230, 244));
}

void BtnSTCheckBlue::DrawMouseMoveBitmap(CDC* pDC, CRect itemRect)
{
    CRect focusRect = itemRect;
    focusRect.DeflateRect(2, 2);
    pDC->Draw3dRect(focusRect, ::GetSysColor(COLOR_BTNSHADOW), ::GetSysColor(COLOR_BTNHILIGHT));

    focusRect.DeflateRect(2, 2);
    pDC->FillSolidRect(focusRect, RGB(202, 230, 244));
}

void BtnSTCheckBlue::OnButtonClicked()
{
    CString csText;
    this->GetWindowText(csText);
    GetParent()->SendMessage(WM_USER + 124, 0, (LPARAM)(const char*)csText);

    if (m_bSetFocusByUser) m_bIsFocused = TRUE;
}
